<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/6/3
  Time: 11:25
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改</title>
    <link rel="stylesheet" href="css/table.css" type="text/css">
    <link rel="stylesheet" href="css/login.css" type="text/css">
</head>
<body>
<form action="${pageContext.request.contextPath}/updateUserServlet" method="post">
    <!--隐藏域-->
    <input type="hidden" name="checkName" value="${user.name}">
    <div class="da">
        <div class="top">
            <h1 style="margin-left: 500px">修改用户信息</h1>
        </div>
        <div class="low">
            <table>
                <tr>
                    <td class="left">
                        <label for="name">姓名</label>
                    </td>
                    <td class="right">
                        <input type="text" id="name" name="name" value="${user.name}" placeholder="请输入新的姓名">
                    </td>
                </tr>
                <tr>
                    <td class="left">
                        <label for="sex">性别</label>
                    </td>
                    <td class="right">
                        <c:if test="${user.sex=='男'}">
                        <input type="radio" id="sex" name="sex" value="男" checked>男
                        <input type="radio" name="sex" value="女">女
                        </c:if>
                        <c:if test="${user.sex=='女'}">
                            <input type="radio" id="sex" name="sex" value="男">男
                            <input type="radio" name="sex" value="女" checked>女
                        </c:if>
                    </td>

                </tr>
                <tr>
                    <td class="left">
                        <label for="age">年龄</label>
                    </td>
                    <td class="right">
                        <input type="text" id="age" name="age" value="${user.age}" placeholder="请输入新的年龄">
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="login">
                        <input type="submit" value="提交">
                        <a href="${pageContext.request.contextPath}/userListServlet">返回</a>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</form>
</body>
</html>
